<div class="listArea l">
  <div class="grybox">
    <h3>Cinema List - <?php echo $merchant->getName(); ?></h3>

    <?php include_partial('global/pager', array('pager' => $pager, 'sort' => array(CinemaForm::SORT_NAME => 'Name', CinemaForm::SORT_CREATED_AT => 'Created Date'))) ?>

    <div class="listBox" style="clear:both;">
      <div class="listWarp1">Name</div>
      <div class="listWarp3">State</div>
      <div class="listWarp3">Map</div>
    </div>
    <div class="listBoxWht">
      <?php if ($pager->getNbResults()) : ?>
      <?php foreach ($pager->getResults() as $cinema) : ?>
      <div class="frmRow<?php if ($cinema->getStatus() == Constants::STATUS_INACTIVE) : ?> frmRowInactive<?php endif; ?>">
        <div class="listWarp1"><?php echo $cinema->getName(); ?></div>
        <div class="listWarp3"><?php echo $cinema->getSTATE()->getName(); ?></div>
        <div class="listWarp3"><a href="<?php echo $cinema->getUrlGmap(); ?>" target="_blank">Link</a></div>
        <div class="editWarp"><a href="<?php echo url_for('@cinema_edit?id=' . $cinema->getId()); ?>#f">Edit</a></div>
      </div>
      <?php endforeach; ?>
      <?php endif; ?>
    </div>

    <div class="fcnLinks">
        <?php echo link_to('Back to Merchants', '@merchant_add', array('class'=>'icoBack'))?>
    </div>
  </div>
</div>


<form class="f" action="?#f" method="POST" enctype="multipart/form-data">
  <div class="grybox">
    <h1><?php if (isset($isEdit)) : ?>Edit<?php else : ?>Add<?php endif; ?> Cinema</h1>
    <div class="fmArea">
      <?php echo include_partial('global/errorsList', array('forms' => array($form), 'global' => $errorCollector)); ?>
      <?php if ($sf_request->hasParameter('success')) : ?><div class="succDis"><?php echo LangUtil::getText('message_save_success'); ?></div><?php endif; ?>
      <div class="singleColumn">

        <h2></h2>
        <div class="frmRow">
          <?php echo $form[CinemaForm::FIELD_MERCHANT_ID]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[CinemaForm::FIELD_MERCHANT_ID]->render(); ?><input type="text" class="txtBox1" value="<?php echo $merchant->getName(); ?>" readonly="readonly" /></div>
        </div>
        <div class="frmRow">
          <?php echo $form[CinemaForm::FIELD_NAME]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[CinemaForm::FIELD_NAME]->render(array('class'=>'txtBox1')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[CinemaForm::FIELD_NUM_SCREENS]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[CinemaForm::FIELD_NUM_SCREENS]->render(array('class'=>'drpBox1')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[CinemaForm::FIELD_STREET_NUMBER]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[CinemaForm::FIELD_STREET_NUMBER]->render(array('class'=>'wideTxtBox')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[CinemaForm::FIELD_STREET_NAME]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[CinemaForm::FIELD_STREET_NAME]->render(array('class'=>'wideTxtBox')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[CinemaForm::FIELD_SUBURB]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[CinemaForm::FIELD_SUBURB]->render(array('class'=>'wideTxtBox')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[CinemaForm::FIELD_POSTAL_CODE]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[CinemaForm::FIELD_POSTAL_CODE]->render(array('class'=>'txtBox2')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[CinemaForm::FIELD_STATE_ID]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[CinemaForm::FIELD_STATE_ID]->render(array('class'=>'drpBox1')); ?></div>
        </div>
        <div class="frmRow">
          <?php echo $form[CinemaForm::FIELD_LOGO_FILE]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[CinemaForm::FIELD_LOGO_FILE]->render(array('class'=>'txtBox2')); ?><br />(Logo must be 30 x 30 dimensions and no greater than 300kb)</div>
        </div>
        <div class="frmRow">
          <?php echo $form[CinemaForm::FIELD_STATUS]->renderLabel(null, array('class'=>'frmLable')); ?>
          <div class="frmtxtBox"><?php echo $form[CinemaForm::FIELD_STATUS]->render(array('class'=>'drpBox1')); ?></div>
        </div>
      </div>

      <div class="butArea">
        <input name="" type="submit" class="buttnSrh11" value="Save Changes" />
      </div>

      <div class="fcnLinks">
          <?php echo link_to('Back to Merchants', '@merchant_add', array('class'=>'icoBack'))?>
      </div>
    </div>
  </div>
  <?php echo $form['_csrf_token']->render(); ?>
</form>